﻿using System;
using System.Collections.Generic;
using System.IO;
using System.ComponentModel;
using System.Text;
using System.Threading;
using System.Runtime.Serialization.Formatters.Binary;
using System.Xml.Serialization;

namespace Scheduler
{
    public static class ListAndArrayExtensions
    {
        public static TInterface[] ToInterfaceArray<TInterface, TClass>(this TClass[] items)
            where TInterface : class
            where TClass : class, TInterface
        {
            TInterface[] array = new TInterface[items.Length];
            for (int n = 0; n < items.Length; n++) array[n] = items[n] as TInterface;
            return array;
        }
    }
}